﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class HpBar : MonoBehaviour {

	public Image forground;
	[Range(0f,1f)]
	public float percent;

	void Update()
	{

		forground.fillAmount = percent;

		forground.color = Color.Lerp (Color.red,Color.green,percent);
	}
		
}
